﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<VideoBlog.Web.Models.CategorySummaryViewModel>" %>

<ul class="noborder">
 <% if (Model.Category != null)
    {%>
    <li class="title">Popular videos in <%= Model.Category.CategoryName%></li>
    <%}
    else
    { %>
    <li class="title">Popular videos</li>
    
    <%} %>
    
    <div class="featured">
        <%VideoBlog.Data.Entities.Video vid = Model.Popular.Videos.First();
               %>
       
         <img class="videolink" src="/Content/images/Evolution.jpg" />
            <% Html.RenderPartial("PlaylistItem-small", vid); %>
</div>
    
    <% foreach (VideoBlog.Data.Entities.Video v in Model.Popular.Videos.Skip(1))
       { %>
    <li>
        <% Html.RenderPartial("PlaylistItem-small", v); %>
        <div class="clearfix">
        <a class="highlight" href="/watch/<%=v.Playlist.PlaylistID %>/<%= v.VideoID %>/<%=v.Playlist.Slug %>/<%= v.Slug %>">
        <%= v.Playlist.PlaylistTitle%></a><b style="float:right; padding-top:3px;">In:&nbsp;</b></div>
    </li>
    <%} %>
</ul>
